package cn.com.cifi.mars.web.action.sys;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.bean.vo.sys.rsp.DictionaryVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/dictionary")
public interface ISysDictionaryController {
	
	 
	 @ApiOperation(value = "数据字典父级下拉框（新增修改使用）", notes = "数据字典父级下拉框（新增修改使用）")
	 @GetMapping(value = "list")
	 public R<String> getDictionaryList(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	 	 

	 @ApiOperation(value = "分页查询数据字典", notes = "分页查询数据字典")
	 @GetMapping(value = "dictionaryPage")
	 public R<DictionaryVo> getDictionaryPage(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
	            @ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
	            @ApiParam(value = "每页条数", required = true, defaultValue = "2") @RequestParam(value = "pageSize") String pageSize,
	            @ApiParam(value = "字典类型编码", required = false) @RequestParam(value = "typeCode" , defaultValue = "") String typeCode,
	 			@ApiParam(value = "字典名称", required = false) @RequestParam(value = "dictName" , defaultValue = "") String dictName);
	 

	 @ApiOperation(value = "根据字典类型code显示不同的下拉框数据", notes = "根据字典类型名称显示不同的下拉框数据")
	 @GetMapping(value = "typeCode")
	 public R<String> getDictionaryByTypeCode(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
	            @ApiParam(value = "字典类型编码", required = false) @RequestParam(value = "typeCode",defaultValue = "") String typeCode);
 	 
}
